package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

public class PlayabilityStatus implements Sequenceable, Serializable {


    @SerializedName("reason")
    private String reason;

    @SerializedName("contextParams")
    private String contextParams;

    @SerializedName("status")
    private String status;

    @SerializedName("errorScreen")
    private ErrorScreen errorScreen;



    public static final Sequenceable.Producer<PlayabilityStatus> CREATOR = new Producer<PlayabilityStatus>() {
        @Override
        public PlayabilityStatus createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            PlayabilityStatus playabilityStatus = new PlayabilityStatus();
            playabilityStatus.unmarshalling(parcel);
            return playabilityStatus;
        }
    };


    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeString(this.reason);
        parcel.writeString(this.contextParams);
        parcel.writeString(this.status);
        parcel.writeSequenceable(this.errorScreen);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.reason=parcel.readString();
        this.contextParams=parcel.readString();
        this.status=parcel.readString();
        parcel.readSequenceable(this.errorScreen);
        return true;
    }

    @Override
    public String toString() {
        return "PlayabilityStatus{" +
                "reason='" + reason + '\'' +
                ", contextParams='" + contextParams + '\'' +
                ", status='" + status + '\'' +
                ", errorScreen=" + errorScreen +
                '}';
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getContextParams() {
        return contextParams;
    }

    public void setContextParams(String contextParams) {
        this.contextParams = contextParams;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public ErrorScreen getErrorScreen() {
        return errorScreen;
    }

    public void setErrorScreen(ErrorScreen errorScreen) {
        this.errorScreen = errorScreen;
    }
}
